Hay muchas funciones para trabajar, analizar y modificar estos objetos. Por ejemplo
dim(map_barrios) # nos dice cuantas `features` hay. En este caso polígonos
## [1] 128 4
st_area(map_barrios) # nos da el área de cada uno de los polígonos
## Units: [m^2]
## [1] 1461419.6 1026606.4 591318.7 740494.4 951002.5 445247.6
## [7] 967645.5 1075925.9 567725.8 1392299.7 1056584.8 646806.5
## [13] 795475.6 744061.6 620354.6 1032389.7 491627.1 1897360.6
## [19] 642638.4 870370.9 771045.1 854034.6 1603158.7 526446.9
## [25] 774435.9 1707104.8 1035494.0 761851.7 1714637.4 1787306.4
## [31] 2164233.2 713526.0 1185339.9 705792.0 999170.0 1163937.9
## [37] 604598.0 508225.5 579176.4 611027.2 937723.6 976850.0
## [43] 1067818.3 187812697.2 1496684.2 2860411.4 1363616.2 2156862.7
## [49] 8984663.5 6906049.7 26365060.7 17454584.6 757918.2 14180481.8
## [55] 1406882.6 3292882.8 3558004.3 5833273.1 1292174.4 1389022.4
## [61] 1684427.5 2839859.4 9206193.8 5421319.4 3605761.4 664786.2
## [67] 1109593.1 1901910.0 1598661.5 1606215.9 5625327.4 1570519.9
## [73] 1313311.9 1422619.3 1470789.0 775134.7 902190.0 768550.5
## [79] 1101274.8 5990050.9 1072588.5 1720319.2 3071568.1 1248388.2
## [85] 1857568.9 1011934.8 738124.3 1793685.3 996243.3 970546.8
## [91] 591806.0 3191455.8 2325994.8 722078.1 888438.5 1052470.5
## [97] 1015481.2 566551.4 245188.1 1427627.6 1143402.8 3146667.0
## [103] 2523248.8 2622101.6 1230948.2 16727328.1 9082299.0 1093975.5
## [109] 6364719.4 1524663.8 2112397.5 49694871.0 2062994.9 32561020.4
## [115] 2424385.0 2271836.7 548334.9 367851.2 1304313.1 9258990.6
## [121] 5004149.1 1617366.0 1880616.5 1983858.2 25095226.9 628745.8
## [127] 9568166.0 4660164.0
Por otro lado st_centroid(map_barrios) nos devuelve las coordenadas de los centros de cada polígono
cc <- st_centroid(map_barrios)
head(st_geometry(cc),2)
## Geometry set for 2 features
## Geometry type: POINT
## Dimension: XY
## Bounding box: xmin: 439528.8 ymin: 4473624 xmax: 440497.1 ymax: 4474317
## Projected CRS: ED50 / UTM zone 30N
Como vemos las coordenadas no están en lat, lon. Eso es debido a que el mapa utiliza una proyección de datos geográficos diferente a la habitual
st_crs(map_barrios)
## Coordinate Reference System:
## User input: ED50 / UTM zone 30N
## wkt:
## PROJCRS["ED50 / UTM zone 30N",
## BASEGEOGCRS["ED50",
## DATUM["European Datum 1950",
## ELLIPSOID["International 1924",6378388,297,
## LENGTHUNIT["metre",1]]],
## PRIMEM["Greenwich",0,
## ANGLEUNIT["degree",0.0174532925199433]],
## ID["EPSG",4230]],
## CONVERSION["UTM zone 30N",
## METHOD["Transverse Mercator",
## ID["EPSG",9807]],
## PARAMETER["Latitude of natural origin",0,
## ANGLEUNIT["degree",0.0174532925199433],
## ID["EPSG",8801]],
## PARAMETER["Longitude of natural origin",-3,
## ANGLEUNIT["degree",0.0174532925199433],
## ID["EPSG",8802]],
## PARAMETER["Scale factor at natural origin",0.9996,
## SCALEUNIT["unity",1],
## ID["EPSG",8805]],
## PARAMETER["False easting",500000,
## LENGTHUNIT["metre",1],
## ID["EPSG",8806]],
## PARAMETER["False northing",0,
## LENGTHUNIT["metre",1],
## ID["EPSG",8807]]],
## CS[Cartesian,2],
## AXIS["(E)",east,
## ORDER[1],
## LENGTHUNIT["metre",1]],
## AXIS["(N)",north,
## ORDER[2],
## LENGTHUNIT["metre",1]],
## USAGE[
## SCOPE["Engineering survey, topographic mapping."],
## AREA["Europe - between 6°W and 0°W - Channel Islands (Jersey, Guernsey); France offshore; Gibraltar; Ireland offshore; Norway including Svalbard - offshore; Spain - onshore; United Kingdom - UKCS offshore."],
## BBOX[35.26,-6,80.49,0.01]],
## ID["EPSG",23030]]